package com.nacos.consumer.controller;

import com.nacos.consumer.client.IndexClient;
import com.nacos.consumer.client.KafkaClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName:
 * @author:
 * @Description:
 * @Date
 **/
@RestController
public class IndexController {
    @Autowired
    IndexClient indexClient;
    @Autowired
    KafkaClient kafkaClient;

    @GetMapping("/findIndex")
    public String index() {
        return indexClient.findIndex();
    }

    @GetMapping("/sendMessage")
    public void sendMessage(){
        kafkaClient.send();
    }
}
